\(\int x (a+b \log (c x^n)) \, dx\) [45]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 27 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {1}{4} b n x^2+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-1/4*b*n*x^2+1/2*x^2*(a+b*ln(c*x^n))

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2341} \[ \int x \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b n x^2 \]

[In]

Int[x*(a + b*Log[c*x^n]),x]

[Out]

-1/4*(b*n*x^2) + (x^2*(a + b*Log[c*x^n]))/2

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{4} b n x^2+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.19 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {a x^2}{2}-\frac {1}{4} b n x^2+\frac {1}{2} b x^2 \log \left (c x^n\right ) \]

[In]

Integrate[x*(a + b*Log[c*x^n]),x]

[Out]

(a*x^2)/2 - (b*n*x^2)/4 + (b*x^2*Log[c*x^n])/2

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00

method result size
parallelrisch \(\frac {x^{2} b \ln \left (c \,x^{n}\right )}{2}-\frac {b n \,x^{2}}{4}+\frac {x^{2} a}{2}\) \(27\)
norman \(\left (-\frac {b n}{4}+\frac {a}{2}\right ) x^{2}+\frac {b \,x^{2} \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )}{2}\) \(28\)
default \(\frac {x^{2} a}{2}+\frac {b \,x^{2} \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )}{2}-\frac {b n \,x^{2}}{4}\) \(29\)
parts \(\frac {x^{2} a}{2}+\frac {b \,x^{2} \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )}{2}-\frac {b n \,x^{2}}{4}\) \(29\)
risch \(\frac {b \,x^{2} \ln \left (x^{n}\right )}{2}+\frac {x^{2} \left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 b \ln \left (c \right )-b n +2 a \right )}{4}\) \(112\)

[In]

int(x*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/2*x^2*b*ln(c*x^n)-1/4*b*n*x^2+1/2*x^2*a

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.11 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {1}{2} \, b n x^{2} \log \left (x\right ) + \frac {1}{2} \, b x^{2} \log \left (c\right ) - \frac {1}{4} \, {\left (b n - 2 \, a\right )} x^{2} \]

[In]

integrate(x*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

1/2*b*n*x^2*log(x) + 1/2*b*x^2*log(c) - 1/4*(b*n - 2*a)*x^2

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {a x^{2}}{2} - \frac {b n x^{2}}{4} + \frac {b x^{2} \log {\left (c x^{n} \right )}}{2} \]

[In]

integrate(x*(a+b*ln(c*x**n)),x)

[Out]

a*x**2/2 - b*n*x**2/4 + b*x**2*log(c*x**n)/2

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {1}{4} \, b n x^{2} + \frac {1}{2} \, b x^{2} \log \left (c x^{n}\right ) + \frac {1}{2} \, a x^{2} \]

[In]

integrate(x*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/4*b*n*x^2 + 1/2*b*x^2*log(c*x^n) + 1/2*a*x^2

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {1}{2} \, b n x^{2} \log \left (x\right ) - \frac {1}{4} \, b n x^{2} + \frac {1}{2} \, b x^{2} \log \left (c\right ) + \frac {1}{2} \, a x^{2} \]

[In]

integrate(x*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/2*b*n*x^2*log(x) - 1/4*b*n*x^2 + 1/2*b*x^2*log(c) + 1/2*a*x^2

Mupad [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.93 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \, dx=x^2\,\left (\frac {a}{2}-\frac {b\,n}{4}\right )+\frac {b\,x^2\,\ln \left (c\,x^n\right )}{2} \]

[In]

int(x*(a + b*log(c*x^n)),x)

[Out]

x^2*(a/2 - (b*n)/4) + (b*x^2*log(c*x^n))/2